﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="FontStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="#555"></Setter>
        <Setter Property="FontSize" Value="40"></Setter>
    </Style>
    <!--用于API中分类信息展示-->
    <DataTemplate x:Key="ListCategoryTemplate">
        <StackPanel Margin="15" Orientation="Horizontal">
            <TextBlock Style="{StaticResource FontStyle}" FontSize="25" Text="{Binding Id}"></TextBlock>
            <TextBlock Style="{StaticResource FontStyle}" FontSize="25" Text="{Binding Name}"></TextBlock>
        </StackPanel>
    </DataTemplate>
    <!--用于API中根据分类信息编号获取课程的模版-->
    <DataTemplate x:Key="ListCourseTemplate">
        <Border BorderBrush="Gray" BorderThickness="10">
            <Grid Width="300" Height="500" Background="#ddd" Opacity="0.8">
                <Grid.RowDefinitions>
                    <RowDefinition Height="180"></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Image Source="{Binding ThumbnailPic}"
                                           HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                           Width="234" 
                                           Height="144"></Image>
                <StackPanel Grid.Row="1">
                    <TextBlock FontSize="20" 
                                                       Margin="30"
                                                       TextWrapping="Wrap"
                                                       Style="{StaticResource FontStyle}"
                                                       Text="{Binding Name}"></TextBlock>
                </StackPanel>
            </Grid>
        </Border>
    </DataTemplate>
    <!--背景图-->
    <Style x:Key="BackgroundStyle" TargetType="Grid">
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="ms-appx:///Assets/background.jpg"></ImageBrush>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
